These instructions are to download R and RStudio so that you can use them locally on your machine.
- Download R. Go to the main R page.
- Click on “download R”.
- Pick a CRAN mirror, any CRAN mirror. I usually pick UCLA, because, GO BRUINS!
- Choose your operating system

- Then click on the most recent version on R, at the time these instructions qwere created, R-3.4.1.pkg
- Finish installing R as you would any new application. This procedure will vary by operating system.
- Download RStudio. Go to this page.
- Click the green “Download” button under the free column.
- Pick your operating system.

- Finish installing RStudio as you would any new application. This procedure will vary by operating system.
- You will ALWAYS open the RStudio application to work, never R. It’s just that you need R installed to use RStudio—R is running in the background whenever you use RStudio.
- To install the anticipated packages you’ll need for this workshop, run the following code:
p_needed <- c("tidyverse", "lubridate", "stringr", "devtools",
"ggmap", "GGally", "ggbeeswarm",
"mosaic", "lme4", "nlme", "ppcor", "knitr",
"rmarkdown", "markdown", "gee", "haven",
"psych","foreign","lavaan")
packages <- rownames(installed.packages())
p_to_install <- p_needed[!(p_needed %in% packages)]
if(length(p_to_install) > 0){
install.packages(p_to_install)
}
lapply(p_needed, require, character.only = TRUE)
install_github("RandiLGarcia/dyadr")
library(dyadr)
- Enjoy! :)